/**
 * Created by yuanzhy on 2019/1/13.
 */
import {createStore} from 'vuex'

const store = createStore({
    state () {
        return {
            mobile: false,
            nav: false
        }
    },
    mutations: {
        showMobile (state) {
            state.mobile = true
        },
        showNav (state) {
            state.nav = true
        },
        hideNav (state) {
            if (state.mobile) {
                state.nav = false
            }
        },
    }
})
export default store
